//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================
#include "crt0.h"
#include <elastos.h>

_ELASTOS_NAMESPACE_USING

EXTERN_C ECode __cdecl ElastosMain(const BufferOf<WString>& wargv)
{
    ECode ret;
    _CThread_SetLocalObject(TL_APPLET_SLOT, NULL);
    _CThread_SetLocalObject(TL_CALLBACK_SLOT, NULL);
    _CThread_SetLocalValue(TL_DOMAIN_SLOT, NULL);
    _Impl_CallbackSink_SetDefaultCallbackContext(NULL);
    ret =  wmain(wargv.GetUsed(), (wchar_t **)wargv.GetPayload());
    exit(ret);
    return ret;
}
